package com.liuzh.kaoyanspringboot.mapper;

import com.liuzh.kaoyanspringboot.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-11
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {

    List<Comment> findCommentDetail(@Param("articleId") Integer articleId);

    boolean decrementLike(@Param("id") Integer id);

    boolean increaseLike(@Param("id") Integer id);

    Comment selectByCId(@Param("commentId")Integer commentId);

    List<Comment> findReplyByIds(List<Integer> replyCommentIds);

    List<Comment> fListByIds(List<Integer> ids);

    List<Comment> findByPid(@Param("pid") Integer pid);

    Integer myCount();
}
